package com.baizhi.wd.servlet;

import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ForwardB extends HttpServlet {
	public void service(HttpServletRequest request,HttpServletResponse response){
		try{
		//1.设置响应类型
		response.setContentType("text/html;charset=utf-8");
		//2.获取输出流
		PrintWriter out = response.getWriter();
		//3.使用输出流
		out.println("<html>");
		out.println("<title>简答题4</title>");
		out.println("<body>");
		Object obj = request.getAttribute("list");
		List list = (List)obj;
		out.println(list);
		out.println("</body>");
		out.println("</html>");
		}catch(Exception e){e.printStackTrace();}
	}
}
